# Maintainer: Anjandev Momi <anjan@momi.ca>
# Contributor: Maarten van Gompel <proycon@anaproy.nl>
pkgname=sxmo-st
pkgver=0.8.4.1
pkgrel=1
pkgdesc="St fork for Sxmo UI; supports scrollback, invert, and other patches"
url="https://git.sr.ht/~mil/sxmo-st"
arch="all"
license="MIT"
depends="ncurses-terminfo"
makedepends="fontconfig-dev freetype-dev libx11-dev libxext-dev libxft-dev"
subpackages="$pkgname-dbg $pkgname-doc"
provides="st-virtual"
provider_priority=10
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~mil/sxmo-st/archive/$pkgver.tar.gz"
options="!check" # has no tests

prepare() {
	default_prepare
	sed -i '/tic/d' Makefile
}

build() {
	make -C "$builddir"
}

package() {
	make install PREFIX=/usr DESTDIR="$pkgdir"
	mkdir -p "$pkgdir"/usr/share/applications

	cat > "$pkgdir"/usr/share/applications/st.desktop <<-EOF
		[Desktop Entry]
		Name=st
		Comment=st is a simple virtual terminal emulator for X which sucks less
		Exec=st
		Terminal=false
		Type=Application
		Icon=gnome-xterm
		Categories=System;TerminalEmulator;
	EOF
}

sha512sums="
5c11cb15d6f4876875176157829c32fbd774347f12784623331104b6ac982f5a1c401af360f3703a4dec517c8a45f489d6ceb000900086e31440992580cb9f15  sxmo-st-0.8.4.1.tar.gz
"
